home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / tc_tsr10.zip / SAVEINTS.C < prev    next >
Text File  |  1991-06-14  |  2KB  |  47 lines

  1. /*--------------------------------------------------------------------------*
  2.  | Author:                                                                  |
  3.  | Sherif El-Kassas        .       :.                                       |
  4.  | EB dept           \_____o__/ __________                                  |
  5.  | Eindhoven U of Tec       .. /                                            |
  6.  | The Netherlands            /             Email: elkassas@eb.ele.tue.nl   |
  7.  *--------------------------------------------------------------------------*/
  8.  
  9. /*--------------------------------------------------------------------------*
  10.  | The author shall not be liable to the user for any direct, indirect      |
  11.  | or consequential loss arising from the use of, or inability to use,      |
  12.  | any program or file howsoever caused.  No warranty is given that the     |
  13.  | programs will work under all circumstances.                              |
  14.  *--------------------------------------------------------------------------*/
  15.  
  16. /*--------------------------------------------------------------------------*
  17.  |   SAVEINTS is supplied as is with no warranty, expressed or implied.     |
  18.  |   It is not copyrighted, either.                                         |
  19.  |   Usage:  SAVEINTS <interrupt file name>                                 |
  20.  |   Compile with: TCC -mh saveints.c                                       |
  21.  *--------------------------------------------------------------------------*/
  22.  
  23.  
  24. #if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
  25. #error --Compile with LARGE data model
  26. #else
  27.  
  28. #include <stdio.h>
  29.  
  30. extern void _restorezero(void);
  31.  
  32. main(int ac, char **av){
  33.   FILE     *file;
  34.   char far *ints=0L;
  35.  
  36.   if (ac > 1)
  37.     if ( (file=fopen(*++av, "wb")) != NULL){
  38.       _restorezero();
  39.       fwrite(ints, 1, 1024, file);
  40.       fclose(file);
  41.     }
  42.     else printf("Can't create %s\n", *av);
  43.   else printf("Invalid number of parameters\n");
  44. }
  45.  
  46. #endif
  47.